// /zhaokao-info/page

import { post, get } from '@/common/http/request';
import request from '@/common/http/axios';

// /admin/upms/login/getLoginUserInfo


export const getPostList = params => {
  // return post('/zhaokao-info/page', params);
  return request({
    url: '/post/adminList',
    method: 'post',
    data: params,
  });
};

// /post/admin/delete GET

export const deletePost = id => {
  // return post(`/zhaokao-info/delete/${id}`);
  return request({
    url: `/post/admin/delete?id=${id}`,
    method: 'get',
  });
};

// /post/get/{id}  get
export const getPostDetail = id => {
  return request({
    url: `/post/get/${id}`,
    method: 'get',
  });
};

// /post/create  post
export const createPost = params => {
  return request({
    url: `/post/create`,
    method: 'post',
    data: params,
  });
};

// /postComment/admin/list POST
export const getCommentList = params => {
  return request({
    url: `/postComment/admin/list`,
    method: 'post',
    data: params,
  });
};
// /postComment/delete GET
export const deleteComment = id => {
  return request({
    url: `/postComment/delete?id=${id}`,
    method: 'get',
  });
};
